package com.eb.buybuybuy.service.impl;

import com.eb.buybuybuy.annotation.Autowired;
import com.eb.buybuybuy.annotation.Component;
import com.eb.buybuybuy.annotation.Service;
import com.eb.buybuybuy.bean.Goods;
import com.eb.buybuybuy.mapper.GoodsMapper;
import com.eb.buybuybuy.service.GoodsService;

import java.util.List;

@Component
@Service(proxyInterface = GoodsService.class)
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public Goods info(Integer id) throws Exception {
        return goodsMapper.getById(id);
    }

    @Override
    public List<Goods> list() throws Exception {
        return goodsMapper.list();
    }
}
